<!DOCTYPE html>
<html>
<head>
	<title>companyReportDetail.html</title>

	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="this is my page">
	<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<link rel="stylesheet" href="../../../plugins/bootstrap/css/bootstrap.min.css"
		type="text/css"></link>
<!-- 	<link rel="stylesheet" href="../../../plugins/FlatUI/dist/css/flat-ui.css"
		type="text/css"></link> -->
	<link rel="shortcut icon" href="../../../plugins/FlatUI/dist/img/favicon.ico">
	<link rel="stylesheet" href="../../../css/style.css">
	<script type="text/javascript" src="../../../js/jquery.js"></script>
	<script type="text/javascript" src="../../../plugins/FlatUI/dist/js/flat-ui.js"></script>
	<script type="text/javascript" src="../../../plugins/bootstrap/js/messager.js"></script>

<script type="text/javascript" src="../../../js/base.js"></script>
 <script src="../../../js/template.js"></script>
	<script src="../../../js/bootstrap-paginator.js"></script>
	<script src="../../../js/bootstrap-mypaginator.js"></script>

<script type="text/javascript">


//window.pname=productName;
//分页查询
function ajaxLoadData(data){
	$.ajax({
		url:commonurl+"/selectCompanyReportDetail.company",
		type:"POST",
		data:data,
		dataType:"json",
		success:function(data){
			if(data.success){
			obj=data.obj;		
		 /* 	obj.list.forEach(function(value,index){
					
					value.applyDate=new Date(value.applyDate) ;
					value.applyDate=value.applyDate.getFullYear() + "年" + (value.applyDate.getMonth() + 1) + "月" + value.applyDate.getDate() + "日 " + value.applyDate.getHours() + "点" + value.applyDate.getMinutes() + "分" + value.applyDate.getSeconds() + "秒";
			})  */
			var datas={
                	sources:obj.list,
                	commonurlimg:commonurlimg
                	
            	};
			$("#reportDetailContent").html(template("reporoDetailTemplate",datas));
		/* 	obj.list.forEach(function(value,index){
				if(value.status==-1){
			 		$("."+value.id).html("已删除");
			 		$("#"+value.id).html("");
				}
			}) */
			myPaginatorFun("myPages", obj.pageNo, obj.pages);
		}else{
			alert(data.msg);
		}
		}

	})
}


$(function(){
	var companyId = sessionStorage.getItem('companyId');

	// var productName = sessionStorage.getItem('productName');
	//console.log(productName+"#productName");
	
	//window.productName=productName; 
	
	//刚进页面加载数据
 	ajaxLoadData({
		
		pageNo:1,
		companyId:companyId
	}); 
	myoptions.onPageClicked = function(event, originalEvent, type, page) {
		ajaxLoadData({
			pageNo:page,
			companyId:companyId
		});
	};
})


</script>




</head>

<body style="padding: 5px 10px">
	
	<div class="panel panel-primary">
	  <div class="panel-heading">
	    <h3 class="panel-title">企业报表详情</h3>
	  </div>
	  <div class="panel-body">
	  		<table class="table table-hover">
	  			<thead>
	  				<tr>
	  					<th>融资产品</th>
	  					<th>融资目标</th>
	  					<th>实际融资数</th>
	  					<th>佣金</th>
	  				</tr>
	  			</thead>
	  			<tbody id="reportDetailContent">
	  			<script id="reporoDetailTemplate" type="text/html">
	  			{{each sources as i}}
		  			<tr> 	 	 	 	 	 
		  				<td>{{i.productName}}</td>
		  				<td>{{i.totalAmount}}万</td>
		  				<td>{{i.actAmount}}万</td>
		  				<td>{{i.rate}}万</td>
		  			</tr>
                 {{/each}}
</script>
		  		<!-- 	<tr> 	 	 	 	 	 
		  				<td>产品A</td>
		  				<td>800万</td>
		  				<td>400万</td>
		  				<td>12万</td>
		  			</tr> -->
	  			</tbody>
	  		</table>
	  </div>
	</div>
		<div style="text-align: center;">
						<ul id="myPages" ></ul>
					</div>
	
</body>
</html>
